package ca.tatham.scheduler;

public class SimpleTask extends AbstractTask {

	private final long m_id;
	private boolean m_complete = false;

	public SimpleTask(String name, int priority) {
		super(name, priority);
		m_id = System.nanoTime();
	}

	public long getId() {
		return m_id;
	}

	public void doTask() {
		complete();
	}

	protected void complete() {
		m_complete = true;
	}

	public boolean isComplete() {
		return m_complete;
	}

}
